import request from '@/utils/request'

/**
 *  新建电子锁
 * @param paramsObj
 */
export function addLock(paramsObj) {
  return request({
    url: '/regulateLock/add',
    method: 'post',
    params: paramsObj
  })
}

/**
 *  获取电子锁列表
 * @param paramsObj
 */
export function getLockList(paramsObj) {
  return request({
    url: '/regulateLock/findByPage',
    method: 'post',
    params: paramsObj
  })
}

/**
 *  获取电子锁最新情况
 * @param paramsObj
 */
export function getLatestLock(paramsObj) {
  return request({
    url: '/regulateLock/getLatest',
    method: 'post',
    params: paramsObj
  })
}

/**
 *  更新电子锁状态
 * @param paramsObj
 */
export function updateLockStatus(paramsObj) {
  return request({
    url: '/regulateLock/updateLockStatus',
    method: 'post',
    params: paramsObj
  })
}
